﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MulticastTV
{

    /// <summary>
    /// Channel table dimensions and position form
    /// </summary>
    public partial class ChannelTableSettings : Form
    {
        public ChannelTableSettings()
        {
            InitializeComponent();
        }

        private void ChannelTableSettings_Load(object sender, EventArgs e)
        {
            numericUpDown1.Value = Properties.Settings.Default.TableWidth;
            numericUpDown2.Value = Properties.Settings.Default.TableHeight;
            numericUpDown3.Value = Properties.Settings.Default.TableXpos;
            numericUpDown4.Value = Properties.Settings.Default.TableYpos;
        }

        private void saveSettings()
        {
            Properties.Settings.Default.TableWidth = (int)numericUpDown1.Value;
            Properties.Settings.Default.TableHeight = (int)numericUpDown2.Value;
            Properties.Settings.Default.TableXpos = (int)numericUpDown3.Value;
            Properties.Settings.Default.TableYpos = (int)numericUpDown4.Value;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            saveSettings();
            this.Close();
        }
    }
}
